<?php

$baseDir = dirname(dirname(dirname(__FILE__)));
set_include_path(get_include_path().PATH_SEPARATOR.$baseDir.PATH_SEPARATOR.$baseDir.'/incubator');

include '../testingfunctions.php';
include 'framework/lib/Pone/Pone_Exception.php';
include 'Pone/Pone_Cache.php';
include 'Pone/Cache/Pone_Cache_Apc.php';

$option   = new Pone_Cache_ApcOption();
$cache    = Pone_Cache::factory($option);
$cacheKey = 'name';
assertTrue(false === $cache->add($cacheKey, new StdClass(), 0), 'Expected: Cache data can not be added because it is already stored before. ');
echo '<br />';
assertTrue($cache->get($cacheKey) instanceof StdClass, 'Expected: Cached data that is retrieved is an instance of StdClass');
?>